-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Minor: fix AdjustStreamThreadCountTest #20620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RaidenE1 thanks for this fix!
one.start(); | ||
|
||
assertTrue(latch.await(30, TimeUnit.SECONDS)); | ||
assertTrue(latch.await(90, TimeUnit.SECONDS)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why increase the timeout when the number of threads is reduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chia7712. I think this is not the right way to fix the test, also it's taken by someone else in the community. I guess I'll close this PR. Thanks!
final Thread one = adjustCountHelperThread(kafkaStreams, 4, latch); | ||
final Thread two = adjustCountHelperThread(kafkaStreams, 6, latch); | ||
final Thread one = adjustCountHelperThread(kafkaStreams, 1, latch); | ||
final Thread two = adjustCountHelperThread(kafkaStreams, 1, latch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the right change? -- The method name literally says MultipleTimes
so there seems to be an intent to add/remove threads multiple times. If we reduce this to one, it seems we are removing intended test coverage?
AdjustStreamThreadCountTest becomes flaky since this upgrade. The root cause is the timeout is not enough, for every remove and create the kafka stream thread, it takes around 10s. Should takes more on CI. I reduce the times of remove & create kafka streams and add longer timeout.